package ta.structure;

public class TATransition extends TAElem
{
    private String id;
    private String name;
    private String sourceRef;
    private String targetRef;
    private String select = null;
    private String guard = null;
    private String sync = null;
    private String update = null;

    public String getId()
    {
        return id;
    }

    public TATransition setId(String id)
    {
        this.id = id;
        return this;
    }

    public String getName()
    {
        return name;
    }

    public TATransition setName(String name)
    {
        this.name = name;
        return this;
    }

    public String getSourceRef()
    {
        return sourceRef;
    }

    public TATransition setSourceRef(String sourceRef)
    {
        this.sourceRef = sourceRef;
        return this;
    }

    public String getTargetRef()
    {
        return targetRef;
    }

    public TATransition setTargetRef(String targetRef)
    {
        this.targetRef = targetRef;
        return this;
    }

    public String getSelect()
    {
        return select;
    }

    public TATransition setSelect(String select)
    {
        this.select = select;
        return this;
    }

    public String getGuard()
    {
        return guard;
    }

    public TATransition setGuard(String guard)
    {
        this.guard = guard;
        return this;
    }

    public String getSync()
    {
        return sync;
    }

    public TATransition setSync(String sync, boolean isSender)
    {
        this.sync = sync + (isSender ? "!" : "?");
        return this;
    }

    public String getUpdate()
    {
        return update;
    }

    public TATransition setUpdate(String update)
    {
        this.update = update;
        return this;
    }
}
